<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title><?php echo $this->escape($this->title); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="<?php echo $this->baseUrl();?>/css/bootstrap.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="../assets/js/html5shiv.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
  </head>

  <body>

    <div class="container">
      <?php if($this->pageName != 'login') : ?>
      <div class="masthead">
        <h3 class="muted">密码管理</h3>
        
        <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
        <div class="navbar" style="margin-bottom: 5px">
          <div class="navbar-inner">
            <div class="container">
              <a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-responsive-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </a>
              <div class="nav-collapse collapse navbar-responsive-collapse">
                <ul class="nav">
                  <li <?php if(isset($this->home)){?>class="active"<?php }?>><a href="<?php echo $this->url(array('controller' => 'index', 'action' => 'index'));?>">首页</a></li>
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">记录管理 <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                      <li><a href="<?php echo $this->url(array('controller' => 'index', 'action' => 'addrecord'));?>">添加账户</a></li>
                      <li><a href="<?php echo $this->url(array('controller' => 'index', 'action' => 'recordlist', 'page' => 1));?>">账户列表</a></li>
                    </ul>
                  </li>
                  <li><a href="#">账户管理</a></li>
                  <li><a href="#">权限管理</a></li>
                  <li <?php if(isset($this->about)){?>class="active"<?php }?>><a href="<?php echo $this->url(array('controller' => 'index', 'action' => 'about'))?>">关于</a></li>
                </ul>
                <?php if(isset($this->recordlist)): ?>
                <form class="navbar-search pull-left" method="POST" action="<?php echo "http://votesys.com/index/recordlist/page/1/";?>">
                  <input type="text" name="search" class="search-query span2" placeholder="Search">
                </form>
                <?php endif; ?>
              </div><!-- /.nav-collapse -->
            </div>
          </div><!-- /navbar-inner -->
        </div>
        <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
      </div>
      <?php endif; ?>

      <!-- Jumbotron -->
      <div id="content">
        <?php echo $this->layout()->content; ?> 
      </div>

      <hr>
      <div class="footer">
        <p>&copy; Company 2013</p>
      </div>

    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="<?php echo $this->baseUrl();?>/js/jquery-1.7.1.min.js"></script>
    <script src="<?php echo $this->baseUrl();?>/js/bootstrap.min.js"></script>
    <script>
        $(function(){
            // 文档就绪
            $(".container .nav li").click(function(){
                $(this).addClass("active").siblings().removeClass();
            });
            $('.dropdown-toggle').dropdown()
        });
    </script>

  </body>
</html>
